package com.gestion.abs.web.actions;

import java.util.Date;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.gestion.abs.bll.api.GestionAbsence;
import com.gestion.abs.bll.api.GestionMatiere;
import com.gestion.abs.bll.api.gestionUtilisateur;
import com.gestion.abs.bo.Absence;
import com.gestion.abs.bo.Etudiant;
import com.gestion.abs.bo.Matiere;
import com.gestion.abs.bo.Utilisateur;
import com.opensymphony.xwork2.ActionSupport;

public class MatiereAction extends ActionSupport{

	public MatiereAction() {



	}
public String test(){
		
		ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
		
		GestionMatiere gts=(GestionMatiere) context.getBean("gestionMatiere");
		
		try {
			
			Matiere mat=new Matiere(Long.valueOf(1)," libelleMatiere");		
		
			gts.ajouterMatiere(mat);
			
			System.out.println("coucouuuuuuuuuuuuu!");
			//gestionAbsence.chercherAbsence(Long.valueOf(1));
			
		} catch (Exception e) {
			return "error";
		}
		
		return "success";
	}
public static void main(String[] args) {
	
	
	MatiereAction mat=new MatiereAction();
	mat.test();
}
}
